#pragma once

#include <string>
#include <memory>
#include <GL/glew.h>
#include "vortex/graphics/renderable/bfont.h"
#include "vortex/gapi/shader.h"


namespace vortex
{
#define MAX_CHARACTERS 1024

    class BFontRenderer
    {
    private:
        BFont font;
        std::shared_ptr<ShaderProgram> shader;
        GLuint vao;
        GLuint vbo_position;
        GLuint vbo_uv;
        GLuint ibo;

    public:
        BFontRenderer();

        void Begin(const std::string& fontpath);
        void Draw(const std::string& text, float fontscale = 0.01);
        void End();
    };

}
